Skip to content

fix(desktop): allow cross-machine agent mentions#2514

Open
Ansonhkg wants to merge 2 commits into
block:mainfrom
Ansonhkg:codex/fix-cross-machine-agent-mentions
Open

fix(desktop): allow cross-machine agent mentions#2514
Ansonhkg wants to merge 2 commits into
block:mainfrom
Ansonhkg:codex/fix-cross-machine-agent-mentions

Conversation

@Ansonhkg

Copy link
Copy Markdown

Summary

  • allow agents managed on another machine to appear in @ autocomplete when they are members of the current channel
  • preserve the existing respond-to policy check and keep non-member remote agents hidden
  • route the selected agent pubkey as a Nostr p tag without trying to start the remote process locally
  • add unit and desktop E2E regression coverage

Root cause

The mention pipeline correctly identified shared relay agents as invocable, but then applied a local-managed-agent filter before the policy-aware eligibility check. That removed every agent not managed by the current desktop, including valid members running on another machine. Manually typing the name did not restore the missing pubkey tag, so the remote ACP process never received the mention.

User impact

Users connected to the same community can now discover and invoke an in-channel agent from another machine, subject to that agent's existing respond-to policy.

Manual test

  1. Started an agent on Machine A and set Respond-to to Anyone.
  2. Added the agent and the Machine B user to the same channel.
  3. Ran this branch on Machine B with just desktop-standalone.
  4. Confirmed the remote agent appeared in @ autocomplete and responded after selection.

Validation

  • just ci
  • focused unit regression test
  • focused Playwright smoke tests for remote-agent visibility, Nostr p-tag routing, and no local process start
  • no new unwrap() or unsafe code
  • no public API, event kind, endpoint, or configuration documentation required
  • just test not run; this is a desktop-only change and does not modify relay, database, or auth behavior

Fixes #2508

@Ansonhkg
Ansonhkg marked this pull request as ready for review July 23, 2026 13:09
@Ansonhkg
Ansonhkg requested a review from a team as a code owner July 23, 2026 13:09
Ansonhkg added 2 commits July 23, 2026 14:13
Signed-off-by: ansonhkg <ansonox@gmail.com>
Signed-off-by: ansonhkg <ansonox@gmail.com>
@Ansonhkg
Ansonhkg force-pushed the codex/fix-cross-machine-agent-mentions branch from b6f6407 to 8e85aa1 Compare July 23, 2026 13:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Remote Agent Missing from @ Mention Autocomplete Across Machines

1 participant